<template>
    <div>
        <h3>子组件1</h3>
        <h4>玩具：{{ toy }}</h4>
        <h4>书籍：{{ book }}本</h4>
        <button @click="changeDel($parent)">父亲房产减少</button>
    </div>
</template>
<script setup lang='ts'>
import { ref,reactive, defineExpose} from 'vue'
//数据
let toy = ref("奥特曼")
let book = ref(3)
//将数据交出去
defineExpose({toy,book})
function changeDel(parent:any){
    parent.house -= 1;
}
</script>
<style scoped lang='scss'>
</style>